﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
	<link rel=Stylesheet type="text/css" href="/public/stylesheets/estilo.css">
	<meta http-equiv="Content-Type" content="Text/html; charset=UTF-8"/>
	<title>SGC</title>
	
	#{verbatim}
		${script}
	#{/verbatim}
</head>
<body>
	<div id="conteiner">
		<div id="cabecalho">
			<span id="logo">SGC</span>
			<span class="cantoLogin">
				<img src="/public/images/borda.png" id="borda" height="130px" width="80px"/>
				#{if !logado}
				<span id="saudacao">
				<form action="@{Application.login()}" method="post" id="Login">
					<span class="login"><label for="usuario">Usuário:</label><input type="text" class="texto" name="usuario" id="usuario"/></span><br/>
					<span class="login"><label for="senha">Senha:</label><input type="password" class="texto" name="senha" id="senha"/></span><br/>
					<span class="botao"><input type="submit" value="Entrar"/></span>
				</form>
				#{/if}
				#{else}
				<span id="saudacao2">
					Olá, Usuário. Bom dia!<br/><a href="@{Application.logout()}">Sair</a>
				#{/else}
				</span>
		</div>
		<div id="menu">
			#{verbatim}${menu}#{/verbatim}
		</div>
		<div id="conteudo">
			<div class="titulo">Exibição de Noticias</div>
			<div class="exibicao">
			#{if lis.size() == 0}
			<span class="vazio">Não há Notícias Cadastradas.</span>
			#{/if}
			#{else}
				<table class="exibicaoNoticia">
				<tr class="topo">
					<td>Titulo</td>
					<td>Data</td>
					<td></td>
					<td></td>
					<td></td>
				</tr>
				#{list items:lis, as:'noticia'}
					<tr class="item">
						<td>${noticia.getTitulo()}</td>
						<td>${noticia.getDataDeCadastroString()}</td>
						<td class="botaoExibicao"><img alt="Editar" src="/public/images/editar.jpg" width="15" height="15"></td>
						<td class="botaoExibicao"><a href="@{NoticiaController.exibicaoNoticia(noticia.getCodigo())}"><img alt="Visualizar Noticia" src="/public/images/pessoa.jpg" width="15" height="15"></a></td>
						<td class="botaoExibicao"><a href="@{NoticiaController.excluirNoticia(noticia.getCodigo())}"><img alt="Excluir" src="/public/images/excluir.jpg" width="15" height="15"></a></td>
					</tr>
				#{/list}
				</table>
			#{/else}
			</div>
		</div>
		<div id="rodape">
			#{verbatim}${rodape}#{/verbatim}
		</div>
	</div>
</body>
</html>